<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>tinyOS: tMemBlock.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">tinyOS
   &#160;<span id="projectnumber">v1.00</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('t_mem_block_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">tMemBlock.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="t_mem_block_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#ifndef TMEMBLOCK_H</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#define TMEMBLOCK_H</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &quot;tConfig.h&quot;</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#if !defined(TINYOS_ENABLE_MEMBLOCK) || TINYOS_ENABLE_MEMBLOCK == 1</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="t_event_8h.html">tEvent.h</a>&quot;</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div><div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="struct__t_mem_block.html">   24</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__t_mem_block.html">_tMemBlock</a> {</div><div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="struct__t_mem_block.html#a8b516ab130f86e4b15ca025c98c3dc53">   25</a></span>&#160;    <a class="code" href="struct__t_event.html">tEvent</a> <a class="code" href="struct__t_mem_block.html#a8b516ab130f86e4b15ca025c98c3dc53">event</a>;                   </div><div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="struct__t_mem_block.html#a278e5d28605731490bb61cb8d313a5f3">   27</a></span>&#160;    <span class="keywordtype">void</span> *<a class="code" href="struct__t_mem_block.html#a278e5d28605731490bb61cb8d313a5f3">memStart</a>;                 </div><div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="struct__t_mem_block.html#ab6558f40a619c2502fbc24c880fd4fb0">   28</a></span>&#160;    uint32_t <a class="code" href="struct__t_mem_block.html#ab6558f40a619c2502fbc24c880fd4fb0">blockSize</a>;             </div><div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="struct__t_mem_block.html#a1cc8a4ba5eee24b560f9869012941e91">   29</a></span>&#160;    uint32_t <a class="code" href="struct__t_mem_block.html#a1cc8a4ba5eee24b560f9869012941e91">maxCount</a>;              </div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="struct__t_mem_block.html#a097b552e5270ca956f34af77c4b5aadf">   31</a></span>&#160;    <a class="code" href="struct__t_slist.html">tSlist</a> <a class="code" href="struct__t_mem_block.html#a097b552e5270ca956f34af77c4b5aadf">blockList</a>;                </div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;} <a class="code" href="group___xE5_xAD_x98_xE5_x82_xA8_xE5_x9D_x97.html#ga0892504224d300db87953ba841db0dec">tMemBlock</a>;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="struct__t_mem_block_info.html">   34</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__t_mem_block_info.html">_tMemBlockInfo</a> {</div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="struct__t_mem_block_info.html#a86988a65e0d3ece7990c032c159786d6">   35</a></span>&#160;    uint32_t <a class="code" href="struct__t_mem_block_info.html#a86988a65e0d3ece7990c032c159786d6">count</a>;                 </div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="struct__t_mem_block_info.html#a1cc8a4ba5eee24b560f9869012941e91">   36</a></span>&#160;    uint32_t <a class="code" href="struct__t_mem_block_info.html#a1cc8a4ba5eee24b560f9869012941e91">maxCount</a>;              </div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="struct__t_mem_block_info.html#ab6558f40a619c2502fbc24c880fd4fb0">   37</a></span>&#160;    uint32_t <a class="code" href="struct__t_mem_block_info.html#ab6558f40a619c2502fbc24c880fd4fb0">blockSize</a>;             </div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="struct__t_mem_block_info.html#a80462c64b9184115aa568f08227f7f4a">   38</a></span>&#160;    uint32_t <a class="code" href="struct__t_mem_block_info.html#a80462c64b9184115aa568f08227f7f4a">taskCount</a>;             </div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;} <a class="code" href="group___xE5_xAD_x98_xE5_x82_xA8_xE5_x9D_x97.html#gae752a225a7228c55628d89eccc989ef1">tMemBlockInfo</a>;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group___xE5_xAD_x98_xE5_x82_xA8_xE5_x9D_x97.html#ga5af4d0c00dfeb923f7157c8f80692553">tMemBlockInit</a> (<a class="code" href="struct__t_mem_block.html">tMemBlock</a> *memBlock, <span class="keywordtype">void</span> *<a class="code" href="struct__t_mem_block.html#a278e5d28605731490bb61cb8d313a5f3">memStart</a>, uint32_t <a class="code" href="struct__t_mem_block.html#ab6558f40a619c2502fbc24c880fd4fb0">blockSize</a>, uint32_t blockCnt);</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;uint32_t <a class="code" href="group___xE5_xAD_x98_xE5_x82_xA8_xE5_x9D_x97.html#ga1ffdf77b2ef5b1e59f0738c018747af5">tMemBlockWait</a> (<a class="code" href="struct__t_mem_block.html">tMemBlock</a> *memBlock, <span class="keywordtype">void</span> **mem, uint32_t waitTicks);</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;uint32_t <a class="code" href="group___xE5_xAD_x98_xE5_x82_xA8_xE5_x9D_x97.html#gac5c449adc2d5137dad06af15945cb160">tMemBlockNoWaitGet</a> (<a class="code" href="struct__t_mem_block.html">tMemBlock</a> *memBlock, <span class="keywordtype">void</span> **mem);</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group___xE5_xAD_x98_xE5_x82_xA8_xE5_x9D_x97.html#ga7d3a796b2adc7cae76cdc6dd4eadc3d6">tMemBlockNotify</a> (<a class="code" href="struct__t_mem_block.html">tMemBlock</a> *memBlock, <span class="keywordtype">void</span> *mem);</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group___xE5_xAD_x98_xE5_x82_xA8_xE5_x9D_x97.html#gacb1cf37f4aa43734f48d3faee0883a13">tMemBlockGetInfo</a> (<a class="code" href="struct__t_mem_block.html">tMemBlock</a> *memBlock, <a class="code" href="struct__t_mem_block_info.html">tMemBlockInfo</a> *info);</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;uint32_t <a class="code" href="group___xE5_xAD_x98_xE5_x82_xA8_xE5_x9D_x97.html#gaee9913bc670870b17fa9dd86e125d1fe">tMemBlockDestroy</a> (<a class="code" href="struct__t_mem_block.html">tMemBlock</a> *memBlock);</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="preprocessor">#endif // TINYOS_ENABLE_MEMBLOCK</span></div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* TMEMBLOCK_H */</span><span class="preprocessor"></span></div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="ttc" id="struct__t_mem_block_info_html"><div class="ttname"><a href="struct__t_mem_block_info.html">_tMemBlockInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="t_mem_block_8h_source.html#l00034">tMemBlock.h:34</a></div></div>
<div class="ttc" id="struct__t_mem_block_html"><div class="ttname"><a href="struct__t_mem_block.html">_tMemBlock</a></div><div class="ttdef"><b>Definition:</b> <a href="t_mem_block_8h_source.html#l00024">tMemBlock.h:24</a></div></div>
<div class="ttc" id="struct__t_mem_block_html_a8b516ab130f86e4b15ca025c98c3dc53"><div class="ttname"><a href="struct__t_mem_block.html#a8b516ab130f86e4b15ca025c98c3dc53">_tMemBlock::event</a></div><div class="ttdeci">tEvent event</div><div class="ttdef"><b>Definition:</b> <a href="t_mem_block_8h_source.html#l00025">tMemBlock.h:25</a></div></div>
<div class="ttc" id="group___xE5_xAD_x98_xE5_x82_xA8_xE5_x9D_x97_html_gacb1cf37f4aa43734f48d3faee0883a13"><div class="ttname"><a href="group___xE5_xAD_x98_xE5_x82_xA8_xE5_x9D_x97.html#gacb1cf37f4aa43734f48d3faee0883a13">tMemBlockGetInfo</a></div><div class="ttdeci">void tMemBlockGetInfo(tMemBlock *memBlock, tMemBlockInfo *info)</div><div class="ttdef"><b>Definition:</b> <a href="t_mem_block_8c_source.html#l00136">tMemBlock.c:136</a></div></div>
<div class="ttc" id="t_event_8h_html"><div class="ttname"><a href="t_event_8h.html">tEvent.h</a></div></div>
<div class="ttc" id="struct__t_mem_block_html_a278e5d28605731490bb61cb8d313a5f3"><div class="ttname"><a href="struct__t_mem_block.html#a278e5d28605731490bb61cb8d313a5f3">_tMemBlock::memStart</a></div><div class="ttdeci">void * memStart</div><div class="ttdef"><b>Definition:</b> <a href="t_mem_block_8h_source.html#l00027">tMemBlock.h:27</a></div></div>
<div class="ttc" id="group___xE5_xAD_x98_xE5_x82_xA8_xE5_x9D_x97_html_gaee9913bc670870b17fa9dd86e125d1fe"><div class="ttname"><a href="group___xE5_xAD_x98_xE5_x82_xA8_xE5_x9D_x97.html#gaee9913bc670870b17fa9dd86e125d1fe">tMemBlockDestroy</a></div><div class="ttdeci">uint32_t tMemBlockDestroy(tMemBlock *memBlock)</div><div class="ttdef"><b>Definition:</b> <a href="t_mem_block_8c_source.html#l00153">tMemBlock.c:153</a></div></div>
<div class="ttc" id="struct__t_mem_block_info_html_ab6558f40a619c2502fbc24c880fd4fb0"><div class="ttname"><a href="struct__t_mem_block_info.html#ab6558f40a619c2502fbc24c880fd4fb0">_tMemBlockInfo::blockSize</a></div><div class="ttdeci">uint32_t blockSize</div><div class="ttdef"><b>Definition:</b> <a href="t_mem_block_8h_source.html#l00037">tMemBlock.h:37</a></div></div>
<div class="ttc" id="struct__t_event_html"><div class="ttname"><a href="struct__t_event.html">_tEvent</a></div><div class="ttdef"><b>Definition:</b> <a href="t_event_8h_source.html#l00032">tEvent.h:32</a></div></div>
<div class="ttc" id="group___xE5_xAD_x98_xE5_x82_xA8_xE5_x9D_x97_html_ga7d3a796b2adc7cae76cdc6dd4eadc3d6"><div class="ttname"><a href="group___xE5_xAD_x98_xE5_x82_xA8_xE5_x9D_x97.html#ga7d3a796b2adc7cae76cdc6dd4eadc3d6">tMemBlockNotify</a></div><div class="ttdeci">void tMemBlockNotify(tMemBlock *memBlock, void *mem)</div><div class="ttdef"><b>Definition:</b> <a href="t_mem_block_8c_source.html#l00111">tMemBlock.c:111</a></div></div>
<div class="ttc" id="struct__t_mem_block_info_html_a1cc8a4ba5eee24b560f9869012941e91"><div class="ttname"><a href="struct__t_mem_block_info.html#a1cc8a4ba5eee24b560f9869012941e91">_tMemBlockInfo::maxCount</a></div><div class="ttdeci">uint32_t maxCount</div><div class="ttdef"><b>Definition:</b> <a href="t_mem_block_8h_source.html#l00036">tMemBlock.h:36</a></div></div>
<div class="ttc" id="struct__t_mem_block_html_a097b552e5270ca956f34af77c4b5aadf"><div class="ttname"><a href="struct__t_mem_block.html#a097b552e5270ca956f34af77c4b5aadf">_tMemBlock::blockList</a></div><div class="ttdeci">tSlist blockList</div><div class="ttdef"><b>Definition:</b> <a href="t_mem_block_8h_source.html#l00031">tMemBlock.h:31</a></div></div>
<div class="ttc" id="group___xE5_xAD_x98_xE5_x82_xA8_xE5_x9D_x97_html_ga1ffdf77b2ef5b1e59f0738c018747af5"><div class="ttname"><a href="group___xE5_xAD_x98_xE5_x82_xA8_xE5_x9D_x97.html#ga1ffdf77b2ef5b1e59f0738c018747af5">tMemBlockWait</a></div><div class="ttdeci">uint32_t tMemBlockWait(tMemBlock *memBlock, void **mem, uint32_t waitTicks)</div><div class="ttdef"><b>Definition:</b> <a href="t_mem_block_8c_source.html#l00059">tMemBlock.c:59</a></div></div>
<div class="ttc" id="group___xE5_xAD_x98_xE5_x82_xA8_xE5_x9D_x97_html_ga0892504224d300db87953ba841db0dec"><div class="ttname"><a href="group___xE5_xAD_x98_xE5_x82_xA8_xE5_x9D_x97.html#ga0892504224d300db87953ba841db0dec">tMemBlock</a></div><div class="ttdeci">struct _tMemBlock tMemBlock</div></div>
<div class="ttc" id="struct__t_mem_block_html_ab6558f40a619c2502fbc24c880fd4fb0"><div class="ttname"><a href="struct__t_mem_block.html#ab6558f40a619c2502fbc24c880fd4fb0">_tMemBlock::blockSize</a></div><div class="ttdeci">uint32_t blockSize</div><div class="ttdef"><b>Definition:</b> <a href="t_mem_block_8h_source.html#l00028">tMemBlock.h:28</a></div></div>
<div class="ttc" id="group___xE5_xAD_x98_xE5_x82_xA8_xE5_x9D_x97_html_ga5af4d0c00dfeb923f7157c8f80692553"><div class="ttname"><a href="group___xE5_xAD_x98_xE5_x82_xA8_xE5_x9D_x97.html#ga5af4d0c00dfeb923f7157c8f80692553">tMemBlockInit</a></div><div class="ttdeci">void tMemBlockInit(tMemBlock *memBlock, void *memStart, uint32_t blockSize, uint32_t blockCnt)</div><div class="ttdef"><b>Definition:</b> <a href="t_mem_block_8c_source.html#l00027">tMemBlock.c:27</a></div></div>
<div class="ttc" id="struct__t_mem_block_info_html_a86988a65e0d3ece7990c032c159786d6"><div class="ttname"><a href="struct__t_mem_block_info.html#a86988a65e0d3ece7990c032c159786d6">_tMemBlockInfo::count</a></div><div class="ttdeci">uint32_t count</div><div class="ttdef"><b>Definition:</b> <a href="t_mem_block_8h_source.html#l00035">tMemBlock.h:35</a></div></div>
<div class="ttc" id="struct__t_mem_block_info_html_a80462c64b9184115aa568f08227f7f4a"><div class="ttname"><a href="struct__t_mem_block_info.html#a80462c64b9184115aa568f08227f7f4a">_tMemBlockInfo::taskCount</a></div><div class="ttdeci">uint32_t taskCount</div><div class="ttdef"><b>Definition:</b> <a href="t_mem_block_8h_source.html#l00038">tMemBlock.h:38</a></div></div>
<div class="ttc" id="group___xE5_xAD_x98_xE5_x82_xA8_xE5_x9D_x97_html_gac5c449adc2d5137dad06af15945cb160"><div class="ttname"><a href="group___xE5_xAD_x98_xE5_x82_xA8_xE5_x9D_x97.html#gac5c449adc2d5137dad06af15945cb160">tMemBlockNoWaitGet</a></div><div class="ttdeci">uint32_t tMemBlockNoWaitGet(tMemBlock *memBlock, void **mem)</div><div class="ttdef"><b>Definition:</b> <a href="t_mem_block_8c_source.html#l00090">tMemBlock.c:90</a></div></div>
<div class="ttc" id="group___xE5_xAD_x98_xE5_x82_xA8_xE5_x9D_x97_html_gae752a225a7228c55628d89eccc989ef1"><div class="ttname"><a href="group___xE5_xAD_x98_xE5_x82_xA8_xE5_x9D_x97.html#gae752a225a7228c55628d89eccc989ef1">tMemBlockInfo</a></div><div class="ttdeci">struct _tMemBlockInfo tMemBlockInfo</div></div>
<div class="ttc" id="struct__t_mem_block_html_a1cc8a4ba5eee24b560f9869012941e91"><div class="ttname"><a href="struct__t_mem_block.html#a1cc8a4ba5eee24b560f9869012941e91">_tMemBlock::maxCount</a></div><div class="ttdeci">uint32_t maxCount</div><div class="ttdef"><b>Definition:</b> <a href="t_mem_block_8h_source.html#l00029">tMemBlock.h:29</a></div></div>
<div class="ttc" id="struct__t_slist_html"><div class="ttname"><a href="struct__t_slist.html">_tSlist</a></div><div class="ttdef"><b>Definition:</b> <a href="t_lib_8h_source.html#l00081">tLib.h:81</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="t_mem_block_8h.html">tMemBlock.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
